package com.bristua.mall.order.controller;

import com.bristua.mall.common.bean.Result;
import com.bristua.mall.common.utils.HandleResultUtil;
import com.bristua.mall.order.biz.ConfirmReceiptBiz;
import com.bristua.mall.order.enums.OrderCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/4/26.
 */
@RestController
@Api(value="确认收货",tags={"确认收货"})
public class ConfirmReceiptController {

    @Autowired
    private ConfirmReceiptBiz confirmReceiptBiz;
    @ApiOperation(value="确认收货")
    @PostMapping(value="/api/order/confirm/receipt/{orderId}")
    public Result confirmReceipt(@PathVariable(value="orderId") String orderId){
        confirmReceiptBiz.confirmReceipt(orderId);
        return HandleResultUtil.commonResult(OrderCode.CONFIRM_RECEIPT_SUCCESS.getCode(),OrderCode.CONFIRM_RECEIPT_SUCCESS.getMsg());
    }
}
